
function compare(a, b) {
    a = parseFloat(a);
    b = parseFloat(b);
    return (a >= b ? a : b);
}
function get() {
    var x = document.getElementById("num1").value;
    var y = document.getElementById("num2").value;
    alert(compare(x, y));
}